﻿using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;

namespace mozhi.smarterp.AuthorCenter.Permissions.Repositories
{
    public interface IPermissionItemApiGrantRepository : IRepository<PermissionItemApiGrant,Guid>
    {
        Task<List<PermissionItemApiGrant>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Guid? permissionItemId = null,
           bool includeDetails = false, CancellationToken cancellationToken = default(CancellationToken));

        Task<long> GetCountAsync(string filter = null, Guid? permissionItemId = null, CancellationToken cancellationToken = default(CancellationToken));

        Task<PermissionItemApiGrant> FindAsync(Guid permissionItemId , Guid apiMetadataId, CancellationToken cancellationToken = default(CancellationToken));

        Task<List<PermissionItemApiGrant>> GetListAsync(List<Guid> permissionItemIds);
    }
}
